<style>
.search-category,
.search-language {
    border: 1px solid #DAD3D3;
    /*height: 30px;*/
    padding: 7px 0 7px 5px;
    margin-left: 5px;
    margin-right: 10px;
    width: 110px;
}
</style>
<div class="main-content">
    <div class="left-panel"></div>
    <div class="panel">
        <?php echo $this->element("backend/left_menu");?>
        <div class="content">
            <div class="title">
                <h2 class="t1">Data params Management</h2>
            </div>
            <?php echo $this->session->flash(); ?>
                <div class="top_action">
                    <br />
                    <form action="<?php echo $this->Html->url("/DataParams/admin_index");?>" id="table-list-admin-form" method="post">
            
                    <input type="text" value="" class="searh_input" placeholder="Search key" id="input-search" name="input-search"/>
                    <a class="btnsearch" id="btnSearch">
                        <span>Search</span>
                    </a>
                    <a href="javascript:return false" class="add" onclick="return upload()">
                        <span>Import</span>
                    </a>
                    </form>
                    <form id="uploadfile" method="post" enctype="multipart/form-data" action='<?php echo $this->Html->url("/DataParams/admin_import"); ?>' >
                    <input type="file" name="uploadfile" id="fileUpload" class="file_upload" onchange="this.form.submit();" style="display:none" />
                    
                    </form>
                </div>
                <br />
                <form action="<?php echo $this->Html->url("/DataParams/admin_index");?>" id="table-list-admin-form" method="post" style="overflow-x:scroll">
                <table cellspacing="0" cellpadding="0" class="display" id="table-list-admin" style="overflow:scroll-x">
                    <thead>
                        <tr class="header">
                            <th class="order" width="5%">
                                <a href="#">#</a>
                            </th>
                            <th>
                                <a href="">SDO</a>
                            </th>
                            <th>
                                <a href="">TARIFF</a>
                            </th>
                            <th>
                                <a href="">ACCOUNT ID</a>
                            </th> 
                            <th>
                                <a href="">RR NO</a>
                            </th> 
                            <th>
                                <a href="">REGD. CONSUMER NAME</a>
                            </th> 
                            <th>
                                <a href="">ADDRESS</a>
                            </th>
                            <th>
                                <a href="">LANDMARK</a>
                            </th>
                            <th>
                                <a href="">AREA</a>
                            </th>
                            <th>
                                <a href="">KW HP</a>
                            </th>
                            <th>
                                <a href="">HP *.746</a>
                            </th>
                            <th>
                                <a href="">KVA</a>
                            </th>
                            <th>
                                <a href="">Total Load in KW</a>
                            </th>
                            <th>
                                <a href="">Constant</a>
                            </th>
                            <th>
                                <a href="">DATE OF SERVICE</a>
                            </th>
                            <th>
                                <a href="">STATUS DTC ID</a>
                            </th>
                            <th>
                                <a href="">Station Name</a>
                            </th>
                            <th>
                                <a href="">Feeder Name</a>
                            </th>
                            <th>
                                <a href="">DTC ID</a>
                            </th>
                            <th>
                                <a href="">DTC NAME</a>
                            </th>
                            <th>
                                <a href="">POLE ID</a>
                            </th>
                            <th>
                                <a href="">SECTION</a>
                            </th>
                            <th>
                                <a href="">MR CODE</a>
                            </th>
                            <th>
                                <a href="">MR DAY</a>
                            </th>
                            <th>
                                <a href="">Spot Folio</a>
                            </th>
                            <th>
                                <a href="">DEPOSITS HELD ISD</a>
                            </th>
                            <th>
                                <a href="">DEPOSITS HELD ASD</a>
                            </th>
                            <th>
                                <a href="">BBC</a>
                            </th>
                            <th>
                                <a href="">ASC</a>
                            </th>
                            <th>
                                <a href="">OTHER DEBITS / CREDITS</a>
                            </th>

                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i=1; foreach ($dataPramas as $k=>$dataPrama ) {?>
                        <tr>
                            <td>
                                <?php echo $i++; ?>
                            </td>
                            <td><?php echo  h($dataPrama['DataParam']['sdo']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['tariff']);  ?>&nbsp;</td>

                            <td><?php echo h($dataPrama['DataParam']['account_id']);  ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['rr_no']);  ?></td>
                            <td><?php echo h($dataPrama['DataParam']['regd_consumer_name']); ?>&nbsp;</td>
                            <td><?php echo  h($dataPrama['DataParam']['address']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['landmark']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['area']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['kw']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['hp']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['kva']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['total_load_in_kw']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['constant']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['date_of-server']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['status']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['station_name']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['feeder_name']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['dtc_id']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['dtc_name']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['pole_id']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['section']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['mr_code']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['mr_day']); ?>&nbsp;</td> 
                            <td><?php echo h($dataPrama['DataParam']['spot_folio']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['deposits_held_']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['credit_debit']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['bbc']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['asc']); ?>&nbsp;</td>
                            <td><?php echo h($dataPrama['DataParam']['other_debits']); ?>&nbsp;</td>
                            <td class="action" nowrap>
                                <a class="edit" title="Edit" href="<?php echo $this->Html->url("/DataParams/admin_edit/".$dataPrama['DataParam']['id']); ?>">Edit</a>
                                <a class="delete" href="<?php echo $this->Html->url("/DataParams/admin_delete/".$dataPrama['DataParam']['id']); ?>" title="Delete" onclick="return confirm('Are you sure you want to delete dataprama id: <?php echo $dataPrama['DataParam']['id'] ?> ');">Delete</a>
                            </td>
                        </tr>
                        <?php } ?>

                    </tbody>
                </table>
            </form>
            <br />
            <div>
                <?php echo $this->Paginator->prev('',array('tag'=>'a','class' => 'page-far-left','id'=>'prev'),'', array('tag'=>'a','class' => 'page-far-left','id'=>'prev')); ?>
                <div id="page-info">Page
                    <strong>
                        <?php echo $this->request->params['paging']['DataParam']['page'] ?>
                    </strong>/
                    <?php echo $this->request->params['paging']['DataParam']['pageCount'] ?>
                </div>
                <?php echo $this->Paginator->next("",array('tag'=>'a','class' => 'page-far-right','id'=>'next'), null, array('tag'=>'a','class' => 'page-far-right','id'=>'next')); ?>

            </div>

        </div>
    </div>
    <div class="right-panel"></div>
    <!-- main.end -->
</div>
<script>
$(".page-far-left").click(function() {

    window.location.href = document.getElementById('prev').href;
});
$(".page-far-right").click(function() {

    window.location.href = document.getElementById('next').href;
});
$('#btnSearch').click(function() {
    $('#table-list-admin-form').submit();
});
function upload()
{
    $("#fileUpload").trigger("click");
}
</script>